

<script type="text/javascript">
    $(function() {
        $( "#trend_datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' });
    });
    $(function() {
        $( "#trend_datepicker1" ).datepicker({ dateFormat: 'yy-mm-dd' });
    });
    $(function() {
        $( "#trend_datepicker2" ).datepicker({ dateFormat: 'yy-mm-dd' });
    });
</script>

<?php $data['id'] = "doc_form" ?>

<?= form_open_multipart('mis/saveTrend', $data); ?>
<input type="hidden" name="SBU" value="<?= $sbu; ?>"/>
<table> 
    <tr class="darker"><td class="half">Client</td><td>
            <select name="client_name">
                <?php foreach ($clients as $type): ?>
                    <option value="<?= $type->tid; ?>"><?= $type->name; ?></option>
                <?php endforeach; ?>
                </select></td></tr>
        <!--tr class="darker"><td class="half">Type of Service</td><td>
                <select name="service_type">
                <?php foreach ($serv_types as $type): ?>
                        <option value="<?= $type->tid; ?>"><?= $type->name; ?></option>
                <?php endforeach; ?>
                    </select></td></tr-->
            <tr class="lighter"><td class="half">Type of Service</td><td><input type="text" class="wide" name="service_type" value="<?php echo set_value('service_type'); ?>" /></td> </tr>
            <tr class="lighter"><td class="half">Business Volume</td><td><input type="text" class="wide" name="business_volume" value="<?php echo set_value('business_volume'); ?>" /></td> </tr>
            <tr class="lighter"><td class="half">Date pre-qualified</td><td><input type="text" class="wide" name="date_prequalified" value="<?php echo set_value('date_prequalified'); ?>" id="trend_datepicker2" /></td> </tr>
            <tr class="lighter"><td class="half">Engagement From</td><td><input type="text" class="wide" name="engagement_from" value="<?php echo set_value('engagement_from'); ?>" id="trend_datepicker" /></td> </tr>
            <tr class="darker"><td class="half">Engagement To</td><td><input type="text" class="wide" name="engagement_to" value="<?php echo set_value('engagement_to'); ?>" id="trend_datepicker1" /></td> </tr>

    <tr><td colspan="2" style="text-align: right">
            <input type="submit" value="Submit" />
            <input type="button" value="Cancel" onclick="hide('#trends_result')"/>
        </td></tr>
</table>
</form>